<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: wsx
  Date: 2017/5/10
  Time: 14:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>添加商品</legend>
</fieldset>
<form class="layui-form" action="/admin/addpurgoods" method="post" enctype="multipart/form-data">
    <div class="layui-form-item" id="goods-group">
        <div class="input-group">
            <label class="layui-form-label">商品类型</label>
            <div class="layui-input-block">
                <select name="type" lay-verify="required">
                    <c:forEach items="${SysDict['goods_type']}" var="type">
                        <option value="${type.key}">${type.value}</option>
                    </c:forEach>
                </select>
            </div>
            <br>
            <label class="layui-form-label">商品名称</label>
            <div class="layui-input-block">
                <input type="text" name="goodname" placeholder="请输入商品名称" autocomplete="off" class="layui-input"
                       lay-verify="required">
            </div>
            <br>
            <label class="layui-form-label">商品价格</label>
            <div class="layui-input-block">
                <input type="text" name="price" lay-verify="number" placeholder="请输入商品价格" autocomplete="off"
                       class="layui-input">
            </div>
            <br>
            <%--<label class="layui-form-label">图片链接</label>--%>
            <%--<div class="layui-input-block">--%>
            <%--<input type="text" name="imgurl" placeholder="请输入图片链接" autocomplete="off" class="layui-input">--%>
            <%--</div>--%>
            <%--<div class="site-demo-upload">--%>
            <%--<div class="site-demo-upbar">--%>
            <%--<input type="file" name="upload" id="test">--%>
            <%--</div>--%>
            <%--</div>--%>
            <label class="layui-form-label">商品图片</label>
            <div class="layui-input-block">
                <s:file name="upload" label="上传图片"/>
            </div>
            <br>
            <label class="layui-form-label">商品数量</label>
            <div class="layui-input-block">
                <input type="text" name="goodnumber" lay-verify="number" placeholder="请输入商品数量" autocomplete="off"
                       class="layui-input">
            </div>
            <br>
            <label class="layui-form-label">套餐类型</label>
            <div class="layui-input-block">
                <select name="mealtype" lay-verify="required">
                    <option value="无套餐类型" selected>请选择套餐类型</option>
                    <option value="官方标配">官方标配</option>
                    <option value="套餐一">套餐一</option>
                    <option value="套餐二">套餐二</option>
                    <option value="其它">其它</option>
                </select>
            </div>
            <br>
            <label class="layui-form-label">颜色类型</label>
            <div class="layui-input-block">
                <select name="colortype" lay-verify="required">
                    <option value="无颜色类型" selected>请选择颜色类型</option>
                    <option value="红色">红色</option>
                    <option value="蓝色">蓝色</option>
                    <option value="其它">其它</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-small" lay-submit lay-filter="formDemo">提交</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-small">重置</button>
        </div>
    </div>
</form>

